package com.acoreful.ackitcloud.route;

import com.acoreful.ackitcloud.route.properties.DynamicRouteConfigProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(DynamicRouteConfigProperties.class)
public class GatewayRouteConfiguration {

    @Bean
    NacosDynamicRouteListener nacosDynamicRouteListener(DynamicRouteManger dynamicRouteManger,
                                                        DynamicRouteConfigProperties dynamicRouteProperties){
        return new NacosDynamicRouteListener(dynamicRouteManger,dynamicRouteProperties);

    }
}
